package com.baomidou.springmvc.interceptor;

import java.util.LinkedHashMap;

import org.apache.log4j.Logger;

import com.hazelcast.logging.ILogger;
/**
 * 
 * @author hewei
 * @ClassName: FilterChainDefinitionMapBuilder
 * @Copyright beauty_tech
 * @date 2018年2月5日 上午10:58:45
 * @description 所有的url权限都要从数据库里查，这里只做演示
 */
public class FilterChainDefinitionMapBuilder {
	private static Logger log = Logger.getLogger(FilterChainDefinitionMapBuilder.class);
	public LinkedHashMap<String, String> buildFilterChainDefinitionMap(){
		LinkedHashMap<String, String> map = new LinkedHashMap<>();
		
		map.put("/user/save", "roles[superadmin]");
		map.put("/user/login/**", "anon");
		map.put("/user/noPerm", "anon");
		map.put("/user/testBug/*", "anon");
		map.put("/user/solveBug1/**", "anon");
		map.put("/user/noPerm2Mobile", "anon");
		map.put("/user/toNoPermUI", "anon");
		map.put("/user/toAPIUI", "anon");
		map.put("/user/changeCron/**", "anon");
		map.put("/user/validateRepeatData/*", "anon");
		map.put("/user/repeat", "anon");
		map.put("/pages/noPerm.jsp", "anon");
		map.put("/monitoring", "anon");
		//map.put("/user/noPerm", "anon");
		//map.put("/user/noPerm", "anon");
		
		
		map.put("/attachment/**", "anon");
		map.put("/js/**", "anon");
		map.put("/css/**", "anon");
		map.put("/jquery-easyui-1.5.1/**", "anon");
		map.put("/resources/**", "anon");
		map.put("/images/**", "anon");
		map.put("/html/**", "anon");
		
		
		
		
		
	
		
		
		
		map.put("/**", "authc");
		
		
		log.info("====================》权限map："+map);
		return map;
	}
	
}
